package xib.parserTools.interfaces;

import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;

/**
 * This interface defined all the functions needed to defined properly the
 * functionalities required for the adaptee.
 * @author xavierds
 */
public interface IAdapterParser{

    /**
     * Sets the inputStream to load into this IAdapterParser. 
     * @param input
     * @throws IOException
     */
    public void loadInputStream(InputStream input) throws IOException;

    /**
     * Returns the IHeaderData from the InputStream load into this adaptee. If no
     * inputStream has been loaded succesfully it returs a null.
     * @return A IHeaderData from the InputStream loaded into the adaptee.
     */
    public IHeaderData getHeader();

    /**
     * Returns the list of IChapterData from the InputStream load into
     * this adaptee. If no inputStream has been loaded succesfully it returs a null.
     * @return A list of IChapterData from the InputStream loaded into the adaptee.
     */
    public ArrayList<IChapterData> getChapters();
}
